package com.gitee.algorithm.base;

/**
 * 三角形
 */
public class Triangle {
    private static int row = 5;

    public static void main(String[] args) {
        for (int i = 0; i < row; i++) {
            for (int j = 0; j < row - i; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j < 2 * i + 1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
